package com.yuanfeng.action.admin.admin.service;

import com.yuanfeng.action.admin.admin.dao.AdminDao;
import com.yuanfeng.pojo.Admins;

public class AdminServiceImpl implements AdminService{
	private AdminDao adminDaoImpl;

	public void setAdminDaoImpl(AdminDao adminDaoImpl) {
		this.adminDaoImpl = adminDaoImpl;
	}

	/**
	 * 登陆
	 * @param name
	 * @return
	 */
	public Admins login(String name) {
		return adminDaoImpl.queryByName(name);
	}

	/**
	 * 注册管理员
	 * @param admins
	 */
	public void registerAdmins(Admins admins) {
		adminDaoImpl.regsiterAdmins(admins);
	}
}
